1. Field of the Invention
The present invention relates to a communication device, a communication method, and a non-transitory computer-readable recording medium.
Priority is claimed on Japanese Patent Application No. 2012-037832, filed Feb. 23, 2012, the content of which is incorporated herein by reference.
2. Description of the Related Art
Generally, when data are transferred between a digital camera and an information processing device, such as a personal computer (PC), connection is established therebetween using a USB (universal serial bus) and a PTP (picture transfer protocol: ISO15740) or MTP (media transfer protocol). The USB is a bus for wired communication. The PTP is one of data transfer protocol.
Recently, WLAN (wireless LAN) digital cameras are on sale, and the wireless networking thereof has progressed. A TCP/IP protocol has been primarily used for communication among devices on a network. Further, to support various applications, FTP (file transfer protocol) for transferring files, HTTP (hypertext transfer protocol) for transferring HTML (hypertext markup language) content, and the like are used on higher layers than the TCP/IP layer. Similarly, the PTP can be network compatible if “PTP (picture transfer protocol) over TCP/IP networks: CIPA DC-005” (hereinafter referred to as “PTP-IP”) is used.
Regarding a USB interface, a relationship between a digital camera and an information processing device is the relationship between a USB device and a USB host. When those devices are connected via a cable, a device to be connected is uniquely specified. On the other hand, when multiple devises are present on a network in some cases, it is impossible to uniquely specify a device to be connected at the time those devices participate in network communication. In this case, a device to be connected is specified by a search called discovery, which is defined by UPnP (universal plug and play).
Generally, discovery is means for a client device to detect a server device. In the case of the PTP, an information processing device as a client device detects a digital camera as a server device, and thereby detects a device to be connected. Then, the logical connection is established according to a PTP connection request from the information processing device. However, a digital camera with relatively small resources can be generally connected only to one information processing device, and cannot be connected to multiple information processing devices in some cases. In these cases, the digital camera establishes connection with the information processing device that first transmits a connection request. If there are multiple information processing devices on a network, however, the digital camera is not always connected to a desired information processing device.
FIG. 15 is a sequence chart illustrating a procedure for client devices of a related art to establish PTP connection with a server device. In the case of FIG. 15, the server device is a digital camera 990. The client devices include a PC 991-1 and a PC 991-2. It is assumed here that the digital camera 990 has established WLAN connection with the PC 991-1 and the PC 991-2.
(Step S9901) When a user wants to establish PTP connection between the digital camera 990 and the PC 991-1, the user inputs a service (PTP) activation request instruction to the digital camera 990.
(Step S9902) Upon receiving the service (PTP) activation request instruction, the digital camera 990 transmits service initiation packets to the PC 991-1 and the PC 991-2.
(Step S9903) Upon receiving the service initiation packets, the PC 991-1 and the PC 991-2 transmit device information acquisition request packets to the digital camera 990.
(Step S9904) Upon receiving the device information acquisition request packets, the digital camera 990 transmits device information to the PC 991-1 and the PC 991-2 having transmitted the device information acquisition request packets. Here, the processes from steps S9901 to S9904 are referred to as a “digital camera search process by PC.”
(Step S9905) Upon receiving the device information, the PC 991-1 and the PC 991-2 transmit PTP connection request packets to the digital camera 990. In the case of FIG. 15, the PC 991-1 transmits the PTP connection request packet before PC 991-2 does.
(Step S9906) Upon receiving the PTP connection request packet transmitted from the PC 991-1, the digital camera 990 transmits a PTP connection acceptance packet to the PC 991-1 since the digital camera 990 has not yet established PTP connection with any device.
(Step S9907) Upon receiving the PTP connection request packet transmitted from the PC991-2, the digital camera 990 transmits a PTP connection failure (denial) response packet to deny the establishment of PTP connection.
Here, the processes from steps S9905 to S9907 are referred to as a “PTP connection establishment process.”
When a user operates a digital camera and simultaneously transfers data, such as when a user takes an image with the digital camera and sequentially transfers the picked-up image to a PC, it is operationally preferable in some cases that the digital camera as the server device searches an information processing device as the client device and thus specifies a device to be connected.
Japanese Patent No. 3840243 discloses the following wireless connection method. The user pairs a digital camera with a PC (information processing device) using a USB cable before wireless connection is established therebetween. Then, the server device acquires information concerning the client device. Then, the server device specifies a connection to be wirelessly connected, using the acquired information concerning the client device, thereby establishing a wireless connection with any device.